<!DOCTYPE html>
<a name="anchor1" id="foo"></a>
<a name="anchor2" id="baz"></a>
<a name="anchor3" id="anchor1"></a>

<script src="../include.js"></script>
<script>
    test(() => {
        println(document.anchors.constructor.name);
        println(document.anchors.namedItem('anchor1').name);
        println(document.anchors.namedItem('anchor2').name);
        println(document.anchors.namedItem('anchor3').name);
        println(document.anchors.namedItem('foo').name);
        println(document.anchors.namedItem('baz').name);
    });
</script>
